package com.hikvision.cms;

import org.springframework.stereotype.Component;

import java.io.Serializable;

@Component
public class Result<T>
        implements Serializable {
    private int code = 20000;
    private String message = "success";
    private Object data;

    public Result() {
    }

    public Result(Object data) {
        this.data = data;
    }

    public static com.hikvision.cms.Result newIntance() {
        return new com.hikvision.cms.Result();
    }

    public static com.hikvision.cms.Result newIntance(Object data) {
        return new com.hikvision.cms.Result(data);
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return this.data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}


